<?php

namespace app\common\validate;

use think\Validate;

class OrderValidate extends Validate
{
    protected $rule = [
        'id' => 'require',
        'detail' => 'require',
        'is_cx'  => 'require'
    ];

    protected $message = [
        'id.require' => '订单ID不能为空',
        'detail.require' => '商品详情不能为空',
        'is_cx.require' => '订单类型不能空'
    ];

    protected $scene = [
        'add' => ['detail','is_cx'],
        'cancel' => ['id'],
    ];
}